#pragma once
#include <stddef.h>
#include <stdint.h>

#define TASK_STR_LEN_MAX 128
#define TASK_LIST_MAX 10

typedef enum {
    IDLE,
    INITING,
    PROCING,
    TASK_DONE
} TASK_STATE;
typedef int (*TaskHandle)(const char *, size_t);
typedef struct {
    size_t idx;
    const char* dataBody;
    size_t len;
    TASK_STATE sta;
    TaskHandle exe;
} TaskObj;

int RegTask(TaskHandle exe, const char* dataBody, size_t dataLen);
void TaskInit(void);
void TaskDump(void);
size_t CountTaskRemain(void);
void ExeTask(void);
